const express = require('express')
const { userRouter } = require('./routers/user.js')
const {goodsRouter} = require('./routers/goods.js')
//express实例对象
const app = express()

//处理json格式的参数
app.use(express.json()) 
//处理key=value参数
app.use(express.urlencoded({extended:false}))

//集成路由模块
app.use(userRouter)
app.use(goodsRouter)

//启动服务
app.listen(3000,()=>console.log('监听3000端口，启动服务成功'))
